package operation;

import entity.text.PaperEntity;
import util.PdfUtil;

import java.io.File;

/**
 * @author ：hzs
 * @date ：Created in 2020/12/17 22:00
 * @description：
 * @modified By：
 * @version: $
 */
public class PdfAbstractFileOperation extends AbstractFileOperation {

    @Override
    public String loadTextFromFile(File file) {
        return null;
    }

    @Override
    public PaperEntity getPaperEntityFromFile(File file) throws Exception {
        File txtFileFromPdf = PdfUtil.getTxtFileFromPdf(file);
        PaperEntity paperEntity = new TxtAbstractFileOperation().getPaperEntityFromFile(txtFileFromPdf);
        return paperEntity;
    }
}
